﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;

namespace VehicleMaintenance.Comm
{
	internal class TextIO
	{
		/**/
		/// <summary>
		/// 写日志
		/// </summary>
		/// <param name="filePath"></param>
		/// <param name="theStr"></param>
		public static void WriteLog(string theStr)
		{
			string filePath = Path.Combine(Application.StartupPath,"log.txt");
			if (!File.Exists(filePath))
			{
				File.Create(filePath);
			}
			StreamWriter sw = new StreamWriter(filePath, true, Encoding.Default);
			sw.WriteLine(theStr);
			sw.Flush();
			sw.Close();
		}
	}
}
